import React from 'react';
import Renderer from 'react-test-renderer/shallow';
import Example from 'components/Example';
import { shallow } from 'enzyme';

test('Matches shallow shapshot using react-test-renderer', () => {
  const renderer = new Renderer();

  renderer.render((
    <Example />
  ));
  expect(renderer.getRenderOutput()).toMatchSnapshot();
});


// enzyme

function render() {
  const props = {};

  const component = shallow(
    <Example {...props} />,
  );

  return { component, props };
}

test('matches snapshot with enzyme', () => {
  const { component } = render({});

  expect(component).toMatchSnapshot();
});

